import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:何人亮
 * Date:2024-05-11
 * 20:19
 */
public class Test {
    public static void main(String[] args) {
        int[] arr={1,2,3,3,1,3,3,2,3};
        int a=fun(arr);
        System.out.println(Arrays.toString(arr));
        System.out.println(a);
    }
    public static int fun(int[] arr){
        Arrays.sort(arr);
        return arr[arr.length/2];
    }
}
